/*
 * 文件名：ImageDaoImpl.java
 * 版权：Copyright 2007-2016 517na Tech. Co. Ltd. All Rights Reserved. 
 * 描述： ImageDaoImpl.java
 * 修改人：yanshu
 * 修改时间：2016年1月14日
 * 修改内容：新增
 */
package com.feichuang.chineseWoodCarving.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.feichuang.chineseWoodCarving.dao.ImageDao;
import com.feichuang.chineseWoodCarving.interceptor.BeanUtils;
import com.feichuang.chineseWoodCarving.model.MImageVo;

/**
 * TODO 添加类的一句话简单描述.
 * <p>
 * TODO 详细描述
 * <p>
 * TODO 示例代码
 * 
 * <pre>
 * </pre>
 * 
 * @author yanshu
 */
@Component("imageDao")
public class ImageDaoImpl extends BaseDaoImpl implements ImageDao {

    /**
     * {@inheritDoc}.
     */
    @Override
    public List<MImageVo> selectImagesByBelongID(String belongID) {
        // TODO Auto-generated method stub
        return this.sqlSession.selectList("com.feichuang.chineseWoodCarving.dao.ImageDao.selectImagesByBelongID", belongID);
    }

    /**
     * {@inheritDoc}.
     */
    @Override
    public boolean insertImages(List<MImageVo> imageVoList) {
        // TODO Auto-generated method stub
        for (MImageVo imageVo : imageVoList) {
            BeanUtils.notNull(imageVo);
            this.sqlSession.insert("com.feichuang.chineseWoodCarving.dao.ImageDao.insertImages", imageVo);
        }
        return true;
    }

}
